<template>
  <div :class="[ ...classes , 'titletime']" :style="styleses">{{time}}</div>
</template>
<script>
import dayjs from "dayjs";

import titlemixins from "@/mixins/bigScreen/titlemixins";

export default {
  name: 'titletime',
  mixins: [titlemixins],
  components: {},
  data() {
    return {
      time: "test",
    };
  },
  computed: {},
  watch: {},
  mounted() {
    this.loadData();
  },
  methods: {
    loadData() {
      setInterval(() => {
        let aWeekTxt = [
          "周日",
          "星期一",
          "星期二",
          "星期三",
          "星期四",
          "星期五",
          "周六"
        ];

        let week = aWeekTxt[Number(dayjs().format("d"))];
        this.time =
          dayjs().format("YYYY年MM月DD日 ") +
          week +
          dayjs().format(" HH:mm:ss");
      }, 1000);
    }
  }
};
</script>
<style lang='scss' scoped>
</style>